<%@ page language="java" contentType="text/html; charset=UTF-8"
	isErrorPage="true" pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.*"%>
<%
	response.setStatus(HttpServletResponse.SC_OK);
%>
<!doctype html>
<head>
<meta charset=utf-8 />
<title>错误页面</title>
</head>
<body>
	<script>
		var t = 10;//设定跳转的时间
		setInterval("refer()", 1000); //启动1秒定时
		function refer() {
			if (t == 0) {
				location = "page-login.jsp"; //#设定跳转的链接地址
			}
			document.getElementById('show').innerHTML = "" + t + "秒后跳转到首页"; // 显示倒计时
			t--; // 计数器递减
			//本文转自：
		}
	</script>
	<h2>程序发生了错误，可能查询了不存在的数据或者访问了非法地址！</h2>
	<h3>请检查操作是否正确或者联系管理员347847940@qq.com！</h3>
	<h3>
		<a href=<%=request.getContextPath() + "/page-login.jsp"%>>点击立刻返回首页!</a>
		<a href="javascript:history.back(-1)">返回上一页!</a>
	</h3>
	<h3>
		<span id="show"></span>
	</h3>
	<hr width=80%>
	<h2>
		<font color=#DB1260>错误信息提示页面</font>
	</h2>
	<p>
		引发异常信息： <b> <%=exception.getClass()%>:<%=exception.getMessage()%></b>
	</p>
	<%
	Enumeration<String> e = request.getHeaderNames();
	String key;
	while (e.hasMoreElements()) {
		key = e.nextElement();
	}
	e = request.getAttributeNames();
	while (e.hasMoreElements()) {
		key = e.nextElement();
	}
	e = request.getParameterNames();
	while (e.hasMoreElements()) {
		key = e.nextElement();
	}
	%>
	地址：<%=request.getAttribute("javax.servlet.forward.request_uri")%><br>
	路径：<%=request.getAttribute("javax.servlet.forward.servlet_path")%>
	<p>堆栈跟踪信息：</p>
	<pre>
<%
exception.printStackTrace();
ByteArrayOutputStream ostr = new ByteArrayOutputStream();
exception.printStackTrace(new PrintStream(ostr));
out.print(ostr);
%>
</pre>
	<hr width=80%>
	<footer>
		<div class="container-fluid">
			<p class="copyright">
				Copyright &copy; 2020.GWNG.<a href="https://www-new.gwng.edu.cn/"
					target="_blank" title="广外南国">广外南国</a> - Made by <a
					href="https://www.baidu.com/" title="陆学嘉" target="_blank">陆学嘉</a>
			</p>
		</div>
	</footer>
</body>